package dao

import (
	"time"

	"gitee.com/shuwenhe/shuwen/regist/util"
)

func Regist(phone, password string) error {
	sql := "insert into user(phone,password,createtime) value(?,?,?)"
	createtime := time.Now()
	_, err := util.Db.Exec(sql, phone, password, createtime)
	if err != nil {
		return err
	}
	return nil
}
